
import { defineAmisPlugin, getInputTpl } from '../../base/util';
import ApprovePending, { type IProps } from './fc';

export default defineAmisPlugin<IProps>(({ amisEditor }) => {
  const { getSchemaTpl } = amisEditor;

  return {
    component: ApprovePending,
    options: {
      type: 'portal-approve-pending',
      name: '审批待办',
      icon: 'AuditOutlined',
      description: '审批待办',
      panelTitle: '审批待办面板',
      scaffold: {
        title: '审批待办',
      },
      panelTabs: [
        {
          title: '常规',
          body: [
            getSchemaTpl('collapseGroup', [
              {
                title: '基本',
                body: [
                  getInputTpl('title', { label: '标题' }),
                ],
              },
            ]),
          ],
        },
        {
          title: '外观',
          body: [
            getSchemaTpl('collapseGroup', [
              ...getSchemaTpl('theme:common', { styleName: 'style' }),
            ]),
          ],
        },
      ],
    },
  };
});
